<template>
  <h3>AsyncAddress组件</h3>
  <h4>{{data}}</h4>
</template>
<script lang="ts">
import { defineComponent } from 'vue'
import axios from 'axios'
export default defineComponent({
  name: 'AsyncAddress',
  // setup () {
  //   return axios.get('/data/address.json').then(res => {
  //     return {
  //       data: res.data
  //     }
  //   })
  // }
  async setup () {
    const result = await axios.get('/data/address.json')
    return {
      data: result.data
    }
  }
})
</script>
